﻿using GameFramework.Event;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameFramework;
using UnityEngine.SceneManagement;

namespace Cheng
{
    /// <summary>
    /// 自定义消息基类
    /// </summary>
    public class CustomBaseEventArgs : GameEventArgs
    {
        public static readonly int EventId = typeof(CustomBaseEventArgs).GetHashCode();
        public override int Id
        {
            get
            {
                return EventId;
            }
        }
        public string EventName
        {
            get;
            private set;
        }

        public object[] _Values
        {
            get;
            private set;
        }


        public static CustomBaseEventArgs Create(string name)
        {
            CustomBaseEventArgs testEvent = ReferencePool.Acquire<CustomBaseEventArgs>();
            testEvent.EventName = name;
            return testEvent;
        }

        public static CustomBaseEventArgs Create(string name, params object[] value)
        {
            CustomBaseEventArgs testEvent = ReferencePool.Acquire<CustomBaseEventArgs>();
            testEvent.EventName = name;
            testEvent._Values = value;
            return testEvent;
        }

        public override void Clear()
        {
            EventName = null;
        }
    }
}
